<?php
if(!defined('READY2BLUE'))
	exit;
?>
	<form action="?" method="POST" id="commandform" enctype="multipart/form-data">
	<div class="block">

	<table cellpadding="0" cellspacing="0" width="90%" class="center">
		<tr>
			<td width="90%"><?php echo L('Command line')?> &gt; <?php echo $cwd?></td>
			<td><a href="?command=help"><?php echo L('Help')?></a></td>
		</tr>
		<tr>
			<td>
				<input type="button" onclick="displayhistory()" title="<?php echo L('History')?>" value="  " class="historybutton" />
				<input type="text" name="command" id="command" class="textbox" style="width:90%" />
			</td>
			<td>
				<input type="submit" value=" <?php echo L('Run')?> " class="button" />
			</td>

		</tr>
		<tr>
			<td colspan="2" class="compact">
			<div id="historyblock" style="display:none">
				<ul id="historyoptions">
					<?php foreach($commandHistory->Commands as $c){?>
					<li><a href="##" onclick="inserthistory('<?php echo $c?>');"><?php echo $c?></a></li>
					<?php }?>
				</ul>
			</div>
			</td>
		</tr>
	<?php if(isset($cmdResult)&&($cmdResult->Rst===false)){?>
		<tr>
			<td colspan="2" class="error"><?php echo L('Error')?> : <?php echo $cmdResult->ErrorCode?></td>
		</tr>
	<?php foreach ($cmdResult->Messages as $message){?>
		<tr>
			<td colspan="2"><?php echo $message?></td>
		</tr>
	<?php }?>
	<?php }?>

	<?php if(isset($cmdResult)&&($cmdResult->Rst===true)&&count($cmdResult->Messages)>0){
	foreach ($cmdResult->Messages as $message)
	{
	?>
	<tr>
		<td colspan="2"><?php echo $message?></td>
	</tr>
	<?php
	}
	}
	?>
	</table>
</div>
<div class="block">
	<table cellpadding="0" cellspacing="0" width="90%" class="center">
		<tr>
			<td width="90%"><input type="file" name="file" id="file" class="textbox" /></td>
			<td><input type="button" onclick="upload()" value=" <?php echo L('Upload')?> " class="button" /></td>
		</tr>
	</table>
</div>
</form>

